<template>
 <div class='bg-components-panel-bg-bur w-[352px] rounded-lg border-[0.5px] border-components-panel-border p-1 shadow-lg' >
        <Empty v-if="!vars || vars.length === 0"
          description="没有可用的赋值变量"
        />
        <VarReferenceVars v-if="vars || vars.length > 0"
          searchBoxClassName='mt-1'
          :vars="vars"
          @change="onChange"
          :itemWidth="itemWidth"
          isSupportFileVar
        />
    </div >
</template>
<script setup lang="ts" name="AssignedVarReferencePopup">
import VarReferenceVars from './var-reference-vars.vue'
import type { NodeOutPutVar, ValueSelector, Var } from '@/app/components/workflow/types'
import { Empty } from 'ant-design-vue';

type Props = {
  vars: NodeOutPutVar[]
  onChange: (value: ValueSelector, varDetail: Var) => void
  itemWidth?: number
}

defineProps<Props>();

</script>

